using CodeSaude.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace CodeSaude.Infrastructure.Data.EntityConfig
{
    public class raca_corMap : EntityTypeConfiguration<raca_cor>
    {
        public raca_corMap()
        {
            // Primary Key
            this.HasKey(t => t.id_raca_cor);

            // Properties
            this.Property(t => t.nome_raca_cor)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("raca_cor");
            this.Property(t => t.id_raca_cor).HasColumnName("id_raca_cor");
            this.Property(t => t.nome_raca_cor).HasColumnName("nome_raca_cor");
        }
    }
}
